/**
 * 
 */
package niuke;

import java.util.Scanner;

/**
 * 10 1 2 3 4 5 6 7 8 9
 * 
 * @author zhongfang
 *
 */
public class 青草游戏 {
	static int[] power4 = new int[15];

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		boolean[] dp = new boolean[1000];
		int tmp = 1;
		for (int i = 0; i < power4.length; i++) {
			power4[i] = tmp;
			tmp *= 4;
		}
		getRes(dp);
		int t = scanner.nextInt();// 测试用例个数
		while (t-- > 0) {
			int n = scanner.nextInt();
			if (dp[n]) {
				System.out.println("niu");
			} else {
				System.out.println("yang");
			}
		}

		scanner.close();
	}

	private static void getRes(boolean[] dp) {
		int j = 0;
		for (int i = 1; i < dp.length; i++) {
			if (i == power4[j]) {
				j++;
				dp[i] = true;
			} else {
				// System.out.println(i + " " + j);
				int start = j;
				if (i < power4[j]) {
					start--;
				}
				for (int k = start; k >= 0; k--) {// 分别尝试
					if (!dp[i - power4[k]]) {
						dp[i] = true;
						break;
					}
				}
			}
		}
	}

}
